@{
    ViewData["Title"] = "编辑";
    Layout = "~/Areas/Manager/Views/Shared/_Layout.cshtml";
}
@model Sykj.Entity.Guestbook
<div class="layui-bgn">
    <form class="layui-form" style="padding: 20px 30px 0 0;" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">留言内容</label>
            <div class="layui-col-xs9">
                <textarea placeholder="请输入内容" asp-for="Description" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">留言时间</label>
            <div class="layui-col-xs9">
                <input type="text" asp-for="CreatedDate" lay-verify="required" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">回复内容</label>
            <div class="layui-col-xs9">
                <textarea placeholder="请输入内容" asp-for="ReplyDescription" class="layui-textarea" lay-verify="required"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-col-xs3"></div>
            <div class="layui-col-xs4">
                <button class="layui-btn" lay-submit lay-filter="edit" id="submit" type="button">提交</button>
                <button id="close" type="button" class="layui-btn layui-btn-primary">关闭</button>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-col-xs3"></div>
        </div>
    </form>
</div>
@section scriptsfeet
    {
    <script type="text/javascript">
    layui.config({
        base: '/layuiadmin/' //静态资源所在路径;
    }).use(['form','sykjwh'], function () {

        var $ = layui.$,form = layui.form,sykjwh = layui.sykjwh;

        $("#close").click(function () {
            sykjwh.close();
        });

        //表单提交
        form.on('submit(edit)', function (obj) {
            sykjwh.save('@Url.Action("edit", "Guestbook", new { area = Constant.AREAMANAGER })', obj.field);
        });
    });
    </script>
}
